<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>第13题</title>
    <script>
        // 用户输入
        var week = parseInt(prompt("请输入今天是星期几","1-7"));
        var day = parseInt(prompt("请输入一个天数",));

        // 一周只有 7 天 1 - 7  循环
        // 星期几的第几天 除以7 取余数得到 星期几
        var yushu = (week + day) % 7
        // 余数为几时 就是是星期几  0 为 日
        if (yushu == 0) {
            yushu = "日"
        } else if (yushu == 1) {
            yushu = "一"
        } else if (yushu == 2) {
            yushu = "二"
        } else if (yushu == 3) {
            yushu = "三"
        } else if (yushu == 4) {
            yushu = "四"
        } else if (yushu == 5) {
            yushu = "五"
        } else {
            yushu = "六"
        }
        alert("如果今天是星期" + week + "," + "第" + day + "天后是：" + "星期" + yushu);
    </script>
</head>
<body>
    
</body>
</html>